<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue3</title>
</head>
<body>
  <div id="app"></div>
  <script src="/dist/vue.js"></script>
  <script>
    const { reactive, effect, ref, computed } = Vue;
    const state = reactive({name: 'dj',age: 18})
    effect(() => {
      app.innerHTML = state.name + state.age
    })
    effect(() => {
      state.age
    })

    setTimeout(()=>{
      state.name = 'dengjian'
      state.age = 20
    }, 2000)
  </script>
</body>
</html>